#include <stdio.h>
#include <stdlib.h>

typedef struct ENode* PtrToENode;
struct ENode {
    int V1, V2;
    int weight;
};
typedef PtrToENode Edge;

typedef struct GNode* PtrToGNode;
struct GNode {
    int Nv;/*顶点数*/
    int Ne;/*边数*/
    int G[10][10];
};
typedef PtrToGNode MGraph;

MGraph CreateGraph ( int VertexNum ) {
    int V, W;
    MGraph M = (MGraph)malloc(sizeof(struct GNode));
    M->Nv = VertexNum;
    M->Ne = 0;
    for ( V = 0; V < M->Nv; V++ ) 
        for ( W = 0; W < M->Ne; W++ ) 
            M->G[V][W] = 0;

    return M;
}

void InsertEdge ( MGraph M, Edge E ) {
    M->G[E->V1][E->V2] = E->weight;
    M->G[E->V2][E->V1] = E->weight;
}

MGraph BuildGraph1 () {
    Edge E;
    int V;
    int Nv, i;
    scanf("%d", &Nv);
    MGraph M = CreateGraph(Nv);
    scanf("%d", &(M->Ne));
    if ( M->Ne != 0 ) {
        for ( i = 0; i < M->Ne; i++ ) {
            scanf("%d %d %d", &E->V1, &E->V2, &E->weight);
            InsertEdge(M,E);
        }
    }
    return M;
}

int main () {

    return 0;
}